3.39 \(\int \frac{\csc ^5(x)}{a+b \csc (x)} \, dx\)

Optimal. Leaf size=112 \[ -\frac{\left (3 a^2+2 b^2\right ) \cot (x)}{3 b^3}+\frac{a \left (2 a^2+b^2\right ) \tanh ^{-1}(\cos (x))}{2 b^4}-\frac{2 a^4 \tanh ^{-1}\left (\frac{a+b \tan \left (\frac{x}{2}\right )}{\sqrt{a^2-b^2}}\right )}{b^4 \sqrt{a^2-b^2}}+\frac{a \cot (x) \csc (x)}{2 b^2}-\frac{\cot (x) \csc ^2(x)}{3 b} \]

[Out]

(a*(2*a^2 + b^2)*ArcTanh[Cos[x]])/(2*b^4) - (2*a^4*ArcTanh[(a + b*Tan[x/2])/Sqrt[a^2 - b^2]])/(b^4*Sqrt[a^2 -
b^2]) - ((3*a^2 + 2*b^2)*Cot[x])/(3*b^3) + (a*Cot[x]*Csc[x])/(2*b^2) - (Cot[x]*Csc[x]^2)/(3*b)

________________________________________________________________________________________

Rubi [A]  time = 0.406685, antiderivative size = 112, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 9, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.692, Rules used = {3851, 4092, 4082, 3998, 3770, 3831, 2660, 618, 206} \[ -\frac{\left (3 a^2+2 b^2\right ) \cot (x)}{3 b^3}+\frac{a \left (2 a^2+b^2\right ) \tanh ^{-1}(\cos (x))}{2 b^4}-\frac{2 a^4 \tanh ^{-1}\left (\frac{a+b \tan \left (\frac{x}{2}\right )}{\sqrt{a^2-b^2}}\right )}{b^4 \sqrt{a^2-b^2}}+\frac{a \cot (x) \csc (x)}{2 b^2}-\frac{\cot (x) \csc ^2(x)}{3 b} \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]^5/(a + b*Csc[x]),x]

[Out]

(a*(2*a^2 + b^2)*ArcTanh[Cos[x]])/(2*b^4) - (2*a^4*ArcTanh[(a + b*Tan[x/2])/Sqrt[a^2 - b^2]])/(b^4*Sqrt[a^2 -
b^2]) - ((3*a^2 + 2*b^2)*Cot[x])/(3*b^3) + (a*Cot[x]*Csc[x])/(2*b^2) - (Cot[x]*Csc[x]^2)/(3*b)

Rule 3851

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> -Simp[(d^3*Cot[e
 + f*x]*(d*Csc[e + f*x])^(n - 3))/(b*f*(n - 2)), x] + Dist[d^3/(b*(n - 2)), Int[((d*Csc[e + f*x])^(n - 3)*Simp
[a*(n - 3) + b*(n - 3)*Csc[e + f*x] - a*(n - 2)*Csc[e + f*x]^2, x])/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a,
b, d, e, f}, x] && NeQ[a^2 - b^2, 0] && GtQ[n, 3]

Rule 4092

Int[csc[(e_.) + (f_.)*(x_)]^2*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(
e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> -Simp[(C*Csc[e + f*x]*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m
 + 1))/(b*f*(m + 3)), x] + Dist[1/(b*(m + 3)), Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[a*C + b*(C*(m + 2)
 + A*(m + 3))*Csc[e + f*x] - (2*a*C - b*B*(m + 3))*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m
}, x] && NeQ[a^2 - b^2, 0] &&  !LtQ[m, -1]

Rule 4082

Int[csc[(e_.) + (f_.)*(x_)]*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_
.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> -Simp[(C*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1))/(b*f*(m
+ 2)), x] + Dist[1/(b*(m + 2)), Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[b*A*(m + 2) + b*C*(m + 1) + (b*B*
(m + 2) - a*C)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] &&  !LtQ[m, -1]

Rule 3998

Int[(csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x
_Symbol] :> Dist[B/b, Int[Csc[e + f*x], x], x] + Dist[(A*b - a*B)/b, Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x]
, x] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[A*b - a*B, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3831

Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[1/b, Int[1/(1 + (a*Sin[e
 + f*x])/b), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]

Rule 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(2*e)/d, Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
 NeQ[a^2 - b^2, 0]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\csc ^5(x)}{a+b \csc (x)} \, dx &=-\frac{\cot (x) \csc ^2(x)}{3 b}+\frac{\int \frac{\csc ^2(x) \left (2 a+2 b \csc (x)-3 a \csc ^2(x)\right )}{a+b \csc (x)} \, dx}{3 b}\\ &=\frac{a \cot (x) \csc (x)}{2 b^2}-\frac{\cot (x) \csc ^2(x)}{3 b}+\frac{\int \frac{\csc (x) \left (-3 a^2+a b \csc (x)+2 \left (3 a^2+2 b^2\right ) \csc ^2(x)\right )}{a+b \csc (x)} \, dx}{6 b^2}\\ &=-\frac{\left (3 a^2+2 b^2\right ) \cot (x)}{3 b^3}+\frac{a \cot (x) \csc (x)}{2 b^2}-\frac{\cot (x) \csc ^2(x)}{3 b}+\frac{\int \frac{\csc (x) \left (-3 a^2 b-3 a \left (2 a^2+b^2\right ) \csc (x)\right )}{a+b \csc (x)} \, dx}{6 b^3}\\ &=-\frac{\left (3 a^2+2 b^2\right ) \cot (x)}{3 b^3}+\frac{a \cot (x) \csc (x)}{2 b^2}-\frac{\cot (x) \csc ^2(x)}{3 b}+\frac{a^4 \int \frac{\csc (x)}{a+b \csc (x)} \, dx}{b^4}-\frac{\left (a \left (2 a^2+b^2\right )\right ) \int \csc (x) \, dx}{2 b^4}\\ &=\frac{a \left (2 a^2+b^2\right ) \tanh ^{-1}(\cos (x))}{2 b^4}-\frac{\left (3 a^2+2 b^2\right ) \cot (x)}{3 b^3}+\frac{a \cot (x) \csc (x)}{2 b^2}-\frac{\cot (x) \csc ^2(x)}{3 b}+\frac{a^4 \int \frac{1}{1+\frac{a \sin (x)}{b}} \, dx}{b^5}\\ &=\frac{a \left (2 a^2+b^2\right ) \tanh ^{-1}(\cos (x))}{2 b^4}-\frac{\left (3 a^2+2 b^2\right ) \cot (x)}{3 b^3}+\frac{a \cot (x) \csc (x)}{2 b^2}-\frac{\cot (x) \csc ^2(x)}{3 b}+\frac{\left (2 a^4\right ) \operatorname{Subst}\left (\int \frac{1}{1+\frac{2 a x}{b}+x^2} \, dx,x,\tan \left (\frac{x}{2}\right )\right )}{b^5}\\ &=\frac{a \left (2 a^2+b^2\right ) \tanh ^{-1}(\cos (x))}{2 b^4}-\frac{\left (3 a^2+2 b^2\right ) \cot (x)}{3 b^3}+\frac{a \cot (x) \csc (x)}{2 b^2}-\frac{\cot (x) \csc ^2(x)}{3 b}-\frac{\left (4 a^4\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (1-\frac{a^2}{b^2}\right )-x^2} \, dx,x,\frac{2 a}{b}+2 \tan \left (\frac{x}{2}\right )\right )}{b^5}\\ &=\frac{a \left (2 a^2+b^2\right ) \tanh ^{-1}(\cos (x))}{2 b^4}-\frac{2 a^4 \tanh ^{-1}\left (\frac{b \left (\frac{a}{b}+\tan \left (\frac{x}{2}\right )\right )}{\sqrt{a^2-b^2}}\right )}{b^4 \sqrt{a^2-b^2}}-\frac{\left (3 a^2+2 b^2\right ) \cot (x)}{3 b^3}+\frac{a \cot (x) \csc (x)}{2 b^2}-\frac{\cot (x) \csc ^2(x)}{3 b}\\ \end{align*}

Mathematica [A]  time = 1.63056, size = 125, normalized size = 1.12 \[ \frac{\frac{24 a^4 \tan ^{-1}\left (\frac{a+b \tan \left (\frac{x}{2}\right )}{\sqrt{b^2-a^2}}\right )}{\sqrt{b^2-a^2}}+b \left (3 a^2+2 b^2\right ) \cos (3 x) \csc ^3(x)-3 b \cot (x) \csc (x) \left (\left (a^2+2 b^2\right ) \csc (x)-2 a b\right )+6 a \left (2 a^2+b^2\right ) \left (\log \left (\cos \left (\frac{x}{2}\right )\right )-\log \left (\sin \left (\frac{x}{2}\right )\right )\right )}{12 b^4} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^5/(a + b*Csc[x]),x]

[Out]

((24*a^4*ArcTan[(a + b*Tan[x/2])/Sqrt[-a^2 + b^2]])/Sqrt[-a^2 + b^2] + b*(3*a^2 + 2*b^2)*Cos[3*x]*Csc[x]^3 - 3
*b*Cot[x]*Csc[x]*(-2*a*b + (a^2 + 2*b^2)*Csc[x]) + 6*a*(2*a^2 + b^2)*(Log[Cos[x/2]] - Log[Sin[x/2]]))/(12*b^4)

________________________________________________________________________________________

Maple [A]  time = 0.05, size = 162, normalized size = 1.5 \begin{align*}{\frac{1}{24\,b} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{3}}-{\frac{a}{8\,{b}^{2}} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2}}+{\frac{{a}^{2}}{2\,{b}^{3}}\tan \left ({\frac{x}{2}} \right ) }+{\frac{3}{8\,b}\tan \left ({\frac{x}{2}} \right ) }+2\,{\frac{{a}^{4}}{{b}^{4}\sqrt{-{a}^{2}+{b}^{2}}}\arctan \left ( 1/2\,{\frac{2\,b\tan \left ( x/2 \right ) +2\,a}{\sqrt{-{a}^{2}+{b}^{2}}}} \right ) }-{\frac{1}{24\,b} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-3}}-{\frac{{a}^{2}}{2\,{b}^{3}} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-1}}-{\frac{3}{8\,b} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-1}}+{\frac{a}{8\,{b}^{2}} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-2}}-{\frac{{a}^{3}}{{b}^{4}}\ln \left ( \tan \left ({\frac{x}{2}} \right ) \right ) }-{\frac{a}{2\,{b}^{2}}\ln \left ( \tan \left ({\frac{x}{2}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^5/(a+b*csc(x)),x)

[Out]

1/24/b*tan(1/2*x)^3-1/8/b^2*a*tan(1/2*x)^2+1/2/b^3*a^2*tan(1/2*x)+3/8/b*tan(1/2*x)+2*a^4/b^4/(-a^2+b^2)^(1/2)*
arctan(1/2*(2*b*tan(1/2*x)+2*a)/(-a^2+b^2)^(1/2))-1/24/b/tan(1/2*x)^3-1/2/b^3/tan(1/2*x)*a^2-3/8/b/tan(1/2*x)+
1/8*a/b^2/tan(1/2*x)^2-1/b^4*a^3*ln(tan(1/2*x))-1/2/b^2*a*ln(tan(1/2*x))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^5/(a+b*csc(x)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 0.898211, size = 1378, normalized size = 12.3 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^5/(a+b*csc(x)),x, algorithm="fricas")

[Out]

[1/12*(4*(3*a^4*b - a^2*b^3 - 2*b^5)*cos(x)^3 - 6*(a^4*cos(x)^2 - a^4)*sqrt(a^2 - b^2)*log(-((a^2 - 2*b^2)*cos
(x)^2 + 2*a*b*sin(x) + a^2 + b^2 - 2*(b*cos(x)*sin(x) + a*cos(x))*sqrt(a^2 - b^2))/(a^2*cos(x)^2 - 2*a*b*sin(x
) - a^2 - b^2))*sin(x) + 6*(a^3*b^2 - a*b^4)*cos(x)*sin(x) + 3*(2*a^5 - a^3*b^2 - a*b^4 - (2*a^5 - a^3*b^2 - a
*b^4)*cos(x)^2)*log(1/2*cos(x) + 1/2)*sin(x) - 3*(2*a^5 - a^3*b^2 - a*b^4 - (2*a^5 - a^3*b^2 - a*b^4)*cos(x)^2
)*log(-1/2*cos(x) + 1/2)*sin(x) - 12*(a^4*b - b^5)*cos(x))/((a^2*b^4 - b^6 - (a^2*b^4 - b^6)*cos(x)^2)*sin(x))
, 1/12*(4*(3*a^4*b - a^2*b^3 - 2*b^5)*cos(x)^3 + 12*(a^4*cos(x)^2 - a^4)*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 +
b^2)*(b*sin(x) + a)/((a^2 - b^2)*cos(x)))*sin(x) + 6*(a^3*b^2 - a*b^4)*cos(x)*sin(x) + 3*(2*a^5 - a^3*b^2 - a*
b^4 - (2*a^5 - a^3*b^2 - a*b^4)*cos(x)^2)*log(1/2*cos(x) + 1/2)*sin(x) - 3*(2*a^5 - a^3*b^2 - a*b^4 - (2*a^5 -
 a^3*b^2 - a*b^4)*cos(x)^2)*log(-1/2*cos(x) + 1/2)*sin(x) - 12*(a^4*b - b^5)*cos(x))/((a^2*b^4 - b^6 - (a^2*b^
4 - b^6)*cos(x)^2)*sin(x))]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc ^{5}{\left (x \right )}}{a + b \csc{\left (x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**5/(a+b*csc(x)),x)

[Out]

Integral(csc(x)**5/(a + b*csc(x)), x)

________________________________________________________________________________________

Giac [A]  time = 1.38737, size = 262, normalized size = 2.34 \begin{align*} \frac{2 \,{\left (\pi \left \lfloor \frac{x}{2 \, \pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (b\right ) + \arctan \left (\frac{b \tan \left (\frac{1}{2} \, x\right ) + a}{\sqrt{-a^{2} + b^{2}}}\right )\right )} a^{4}}{\sqrt{-a^{2} + b^{2}} b^{4}} + \frac{b^{2} \tan \left (\frac{1}{2} \, x\right )^{3} - 3 \, a b \tan \left (\frac{1}{2} \, x\right )^{2} + 12 \, a^{2} \tan \left (\frac{1}{2} \, x\right ) + 9 \, b^{2} \tan \left (\frac{1}{2} \, x\right )}{24 \, b^{3}} - \frac{{\left (2 \, a^{3} + a b^{2}\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right )}{2 \, b^{4}} + \frac{44 \, a^{3} \tan \left (\frac{1}{2} \, x\right )^{3} + 22 \, a b^{2} \tan \left (\frac{1}{2} \, x\right )^{3} - 12 \, a^{2} b \tan \left (\frac{1}{2} \, x\right )^{2} - 9 \, b^{3} \tan \left (\frac{1}{2} \, x\right )^{2} + 3 \, a b^{2} \tan \left (\frac{1}{2} \, x\right ) - b^{3}}{24 \, b^{4} \tan \left (\frac{1}{2} \, x\right )^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^5/(a+b*csc(x)),x, algorithm="giac")

[Out]

2*(pi*floor(1/2*x/pi + 1/2)*sgn(b) + arctan((b*tan(1/2*x) + a)/sqrt(-a^2 + b^2)))*a^4/(sqrt(-a^2 + b^2)*b^4) +
 1/24*(b^2*tan(1/2*x)^3 - 3*a*b*tan(1/2*x)^2 + 12*a^2*tan(1/2*x) + 9*b^2*tan(1/2*x))/b^3 - 1/2*(2*a^3 + a*b^2)
*log(abs(tan(1/2*x)))/b^4 + 1/24*(44*a^3*tan(1/2*x)^3 + 22*a*b^2*tan(1/2*x)^3 - 12*a^2*b*tan(1/2*x)^2 - 9*b^3*
tan(1/2*x)^2 + 3*a*b^2*tan(1/2*x) - b^3)/(b^4*tan(1/2*x)^3)